package com.cw.mapper2;

import com.baomidou.mybatisplus.core.mapper.*;
import com.cw.dto.*;
import com.cw.entity.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author smq
 * @since 2021-05-09
 */
@Repository
public interface PatientBedMiddleMapper extends BaseMapper<PatientBedMiddle> {

    /**
     * 中间表关联预约表 查询已登记列表的数据
     * @param condition 查询条件
     * @return java.util.List<com.cw.entity.ThisIiInmaininfo>
     * @author ly
     * @date 2021/5/9 16:40
     */
    List<ThisIiInmaininfo> getThisIiInmaininfos(InpatientRegistrationCondition condition);



    List<PatientBedMiddle> getRegisterBedByBedIds(@Param("bedIds") List<String> bedIds, @Param("status") List<String> status);


    /**
     * 查询已预约但又未登记的患者信息
     * @param localDateTime 小时之前
     * @return java.util.List<com.cw.entity.ThisIiPrepayin>
     * @author ly
     * @date 2021/5/6 10:01
     */
    List<ThisIiPrepayin> getAppointmentTimeOut(LocalDateTime localDateTime);

    List<PatientBedMiddle> getReserved();

    void updateReleaseBed(List<BigDecimal> lstPreid);

    List<PatientBedMiddle> selectPreidBed(List<BigDecimal> lstPreid);

    List<CacelResonInfo> getCacelReson();
}
